﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
namespace SQT.tracnghiem.Ajax.ASP.Events
{
    public partial class check_event_status : System.Web.UI.Page
    {
        public int status=0;
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = int.Parse(Request.QueryString["id"]);

            var get_status = new TblEventOpenController().FetchAll().Where(x => x.EventId == id);
            if(get_status.ToList().Count!=0)
            {
                if (get_status.Last().Status == true)
                {
                    status = 1;
                }
            }
        }
    }
}